package it.diego.projecttwo;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class PaginaPrincipaleActivity extends Activity implements OnClickListener {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.pagina_principale);
        
        Button button1 = (Button)findViewById(R.id.button1);
    	button1.setOnClickListener(this);
    	Button button2 = (Button)findViewById(R.id.button2);
    	button2.setOnClickListener(this);
    	Button button3 = (Button)findViewById(R.id.button3);
    	button3.setOnClickListener(this);
    	Button button4 = (Button)findViewById(R.id.button4);
    	button4.setOnClickListener(this);
    	Button button5 = (Button)findViewById(R.id.button5);
    	button5.setOnClickListener(this);
    	Button button6 = (Button)findViewById(R.id.button6);
    	button6.setOnClickListener(this);
    	Button button7 = (Button)findViewById(R.id.button7);
    	button7.setOnClickListener(this);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.pagina_principale, menu);
        return true;
    }
    
    @Override
    public void onClick(View v) {
    	switch (v.getId()) 
		{
			case R.id.button1:
			{
				startActivity(new Intent(this, ContextMenuActivity.class));
				break;
			}
			case R.id.button2:
			{
				startActivity(new Intent(this, DialogBoxActivity.class));
				break;
			}
			case R.id.button3:
			{
				startActivity(new Intent(this, ActionBarActivity.class));
				break;
			}
			case R.id.button4:
			{
				startActivity(new Intent(this, DragAndDropActivity.class));
				break;
			}
			case R.id.button5:
			{
				startActivity(new Intent(this, ImageGalleryActivity.class));
				break;
			}
			case R.id.button6:
			{
				startActivity(new Intent(this, SlidingDrawerDemo.class));
				break;
			}
			case R.id.button7:
			{
				startActivity(new Intent(this, SlidingActivity.class));
				break;
			}
		}
    }
}
